// JavaScript Document
function validate()
{
   if(document.getElementById('name').value=="")	
	{
		alert('Please Enter Name Field');
	    document.getElementById('name').focus();
		return false;
	}
    
	if(document.admin.usertype[document.admin.usertype.selectedIndex].value==0)
	{
	  alert("Please Select Usertype Field");
	  document.admin.usertype.focus();
	   return false;
	}
	
	if(document.getElementById('loginid').value=="")	
	{
		alert('Please Enter Loginid Field');
	    document.getElementById('loginid').focus();
		return false;
	}
	if(document.getElementById('password').value=="")	
	{
		alert('Please Enter Password Field');
	    document.getElementById('password').focus();
		return false;
	}
	if(document.getElementById('password').value!=document.getElementById('repeatpassword').value)	
	{
		alert('Please Check!Password and Repeat Password Must be Equal');
	    document.getElementById('repeatpassword').focus();
		return false;
	}
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = document.getElementById('emailid').value;
   if(reg.test(address) == false)
   {
      alert('Invalid Email Address');
	  document.getElementById('emailid').focus();
      return false;
   }
	

}

function validate1()
{
    if(document.getElementById('name').value=="")	
	{
		alert('Please Enter Name Field');
	    document.getElementById('name').focus();
		return false;
	}
	if(document.getElementById('loginid').value=="")	
	{
		alert('Please Enter Loginid Field');
	    document.getElementById('loginid').focus();
		return false;
	}
   
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = document.getElementById('emailid').value;
   if(reg.test(address) == false)
   {
      alert('Invalid Email Address');
	  document.getElementById('emailid').focus();
      return false;
   }


}